﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ingredient.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">

    
    <table style="width: 100%">
        <tr>
            <td align ="right">
              <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Large" 
                    ForeColor="#006699" Text="Ingredient Management"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="center">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="SqlDataSource1" HorizontalAlign="Justify" 
                    style="margin-left: 0px" Width="537px">
                    <Columns>
                        <asp:BoundField DataField="Name" HeaderText="Ingredient Name" 
                            SortExpression="Name">
                        <HeaderStyle BackColor="#339933" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Code" HeaderText="Code" SortExpression="Code">
                        <HeaderStyle BackColor="#339933" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price">
                        <HeaderStyle BackColor="#339933" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Dry" HeaderText="Dry" SortExpression="Dry">
                        <HeaderStyle BackColor="#339933" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Expr1" HeaderText="Category" SortExpression="Expr1">
                        <HeaderStyle BackColor="#339933" />
                        </asp:BoundField>
                        <asp:CheckBoxField DataField="InStock" HeaderText="InStock" 
                            SortExpression="InStock">
                        <HeaderStyle BackColor="#339933" />
                        </asp:CheckBoxField>
                        <asp:BoundField DataField="Expr2" HeaderText="Enimal" SortExpression="Expr2">
                        <HeaderStyle BackColor="#339933" />
                        </asp:BoundField>
                        <asp:CommandField ButtonType="Image" 
                            DeleteImageUrl="~/assets/icons/notifications/error.png" ShowDeleteButton="True">
                        <HeaderStyle BackColor="#339933" />
                        </asp:CommandField>
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:TronThucAnConnectionString2 %>" 
                    SelectCommand="SELECT Ingredient.Name, Ingredient.Code, Ingredient.Price, Ingredient.Dry, IngredientCategory.Name AS Expr1, Ingredient.InStock, Animal.Name AS Expr2 FROM Animal INNER JOIN Ingredient ON Animal.AnimalID = Ingredient.AnimalID INNER JOIN IngredientCategory ON Ingredient.CategoryID = IngredientCategory.CategoryID">
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="center">
                &nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button1" runat="server" Font-Bold="True" Height="40px" 
                    Text="ADD NEW" Width="100px" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button2" runat="server" Font-Bold="True" Height="40px" 
                    Text="UPDATE" Width="100px" />
            </td>
        </tr>
    </table>


</asp:Content>

